//
//  CJCommentModel.m
//  CoJellyCartoon
//
//  Created by dllo on 16/4/7.
//  Copyright © 2016年 CJG. All rights reserved.
//

#import "CJCommentModel.h"
#import "CJCommentReplies.h"

@interface CJCommentModel ()
@property (nonatomic, strong) NSMutableArray *array;
@end
@implementation CJCommentModel


- (instancetype)initWithDictionary : (NSDictionary *)dataSource
{
    self = [super init];
    
    [self setValuesForKeysWithDictionary:dataSource];
    
    self.array = [NSMutableArray arrayWithCapacity:0];
    
    if (self) {
        for (NSDictionary *dic in self.replies) {
            
            CJCommentReplies *model = [[CJCommentReplies alloc] init];
            
            [model setValuesForKeysWithDictionary:dic];
            
            [self.array addObject:model];
           
        }
        
        self.replies = [NSArray arrayWithArray:self.array];
    }
    return self;
}
@end
